# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AlertCenter.V1beta1.Model.DeviceCompromisedSecurityDetail do
  @moduledoc """
  Detailed information of a single MDM device compromised event.

  ## Attributes

  *   `deviceCompromisedState` (*type:* `String.t`, *default:* `nil`) - The device compromised state. Possible values are "`Compromised`" or "`Not Compromised`".
  *   `deviceId` (*type:* `String.t`, *default:* `nil`) - Required. The device ID.
  *   `deviceModel` (*type:* `String.t`, *default:* `nil`) - The model of the device.
  *   `deviceType` (*type:* `String.t`, *default:* `nil`) - The type of the device.
  *   `iosVendorId` (*type:* `String.t`, *default:* `nil`) - Required for iOS, empty for others.
  *   `resourceId` (*type:* `String.t`, *default:* `nil`) - The device resource ID.
  *   `serialNumber` (*type:* `String.t`, *default:* `nil`) - The serial number of the device.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deviceCompromisedState => String.t() | nil,
          :deviceId => String.t() | nil,
          :deviceModel => String.t() | nil,
          :deviceType => String.t() | nil,
          :iosVendorId => String.t() | nil,
          :resourceId => String.t() | nil,
          :serialNumber => String.t() | nil
        }

  field(:deviceCompromisedState)
  field(:deviceId)
  field(:deviceModel)
  field(:deviceType)
  field(:iosVendorId)
  field(:resourceId)
  field(:serialNumber)
end

defimpl Poison.Decoder, for: GoogleApi.AlertCenter.V1beta1.Model.DeviceCompromisedSecurityDetail do
  def decode(value, options) do
    GoogleApi.AlertCenter.V1beta1.Model.DeviceCompromisedSecurityDetail.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AlertCenter.V1beta1.Model.DeviceCompromisedSecurityDetail do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
